package com.yyfax.account.dao;

import com.yyfax.account.domain.LiquidationOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 清算日终订单持久化接口
 * 
 * @author buyi
 * @date 2017-10-11 14:57:59
 * @since v2.0.0
 */
public interface LiquidationOrderDao {
	/**
	 * 保存订单信息
	 * 
	 * @author buyi
	 * @date 2017-10-11 14:58:18
	 * @since v2.0.0
	 * @param record
	 * @return
	 */
	public int insert(LiquidationOrder record);

	/**
	 * 根据主键查询
	 * 
	 * @author buyi
	 * @date 2017-10-11 14:58:27
	 * @since v2.0.0
	 * @param orderId
	 * @return
	 */
	public LiquidationOrder selectByPrimaryKey(String orderId);

	/**
	 * 更新订单状态
	 * 
	 * @author buyi
	 * @date 2017-10-11 19:08:02
	 * @since v2.0.0
	 * @param orderId
	 * @param destState 目标状态
	 * @param origState 源状态，该值为可选状态，如果没有传这不匹配条件
	 * @return
	 */
	public int updateStateSelective(@Param("orderId") String orderId, @Param("destState") String destState, @Param("origState") String origState);

}